package com.limao.Admin.Servlet;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.AsyncContext;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.limao.Admin.DBProvider.AdminCityProvider;
import com.limao.Admin.DataClass.AdminCityClass;
import com.limao.Model.LzPluginException;
import com.limao.Model.PublicData;
import com.limao.Model.RecvData;
import com.limao.Tool.CacheClass;

public class AdminAjaxInfo {

	
	//新鲜宝  系统版本更新检查
	public static Object Admin_AJAX_FOR_CITYLST(HttpSession session,HttpServletResponse response,AsyncContext asyncContext,int m,RecvData DataObj) throws LzPluginException
	{
		// 参数检查1(默认值赋值)
		if (CacheClass.isEmpty(DataObj.id)) {
			throw new LzPluginException("参数不正确 ");
		}
		List<Object> listArry=new ArrayList<Object>();

		List<AdminCityClass>  list = AdminCityProvider.getInstance().queryALLCity_BySheng(CacheClass.getIntValue(DataObj.id));
 	   
	 	listArry.addAll(list);
		
		PublicData data = new PublicData();
		data.m = m + "";
		data.state = "1";
		data.info = "取城市列表成功";
		data.list = listArry;
/*		
		List<AdminCityClass>  list = AdminCityProvider.getInstance().queryALLCity();
	 	   
	 	listArry.addAll(list);
		
		PublicData data = new PublicData();
		data.list = listArry;
		
		String str=JSON.toJSONString(data);
		*/
		
		return data;			
	}
	
	
	
}
